Euler's Formula

What is e? One answer is that it is this limit. $$e:=\lim_{x\rightarrow\infty}\left(1-\frac{1}{n}\right)^{n}.$$ This particular definition, due to one of the Bernoulli brothers, comes about from a consideration of money investment. Start with some amount of money equal to $1$ unit and invest it at $100\%$ annual interest. If the interest is paid to you annually, then after $1$ year you get $1$ units. If your principle is also returned, then your total is $2$ units. But suppose that the investment is paid to you every $1/2$ year? Then at $6$ months you would get $.5(1)$ and would then principle + interest is $1.5$ units. At the end of the year, you would get $.5[.5(1)+1]$ and your principal plus total would be $1+.5(1)+.5(1.5)=2.25.$ So let's be aggressive and try to get paid ever more frequently. It is clear that the amount paid each period is increasing. Suppose we will invest for multiple years and we will use variable names. Let r be the annual interest rate paid one time per year and let P be the amount invested.

earned total Factored
year 1 $Pr$ $P+Pr$ $P(1+r)$
year 2 $r(P+Pr)$ $P+Pr+r(P+P\cdot r)$ $P(1+r)^{2}$
year 3 $r\left(P(1+r)^{2}\right)$ $P(1+r)^{2}+r\left(P(1+r)^{2}\right)$ $P(1+r)^{3}$
year 4 $rP(1+r)^{3}$ $P(1+r)^{3}+rP(1+r)^{3}$ $P(1+r)^{4}$

It may not be obvious that in each row the factored column is in fact equal to the total column. To show that, let $P=1$. Then for year $4$ $$(1+r)^{3}+r(1+r)^{3}$$ can be factored into $(1+r)^{3}[1+r]$, which is $(1+r)^{4.}$.

The exponent here is the number of compounding periods. So if instead of $4$ years, we got the payment $4$ times, it would be the same thing. Except, no one is going to pay us an “annual” interest multiple times per year. So for instance, if we are paid $4$ payments over $1$ year, then the first year equation becomes. $$\text{Interest + principle}=P\left(1+\frac{r}{4}\right)^{4}$$ Let's look at this with $P=1$ for $1$ unit invested and with $r=100\%=1$, which returns us to the discussion in the first paragraph. Now suppose we get greedy and want to be paid every week. Then our equation becomes $$\text{Interest + Principle}=1\left(1+\frac{1}{52}\right)^{52}=2.6926.$$ Finally, we get real greedy and ask for the compounding to be continuous. That is, we want the exponent to approach infinity. Thus we want to find $$\lim_{n\rightarrow\infty}\left(1+\frac{1}{n}\right)^{n}$$ and that is a definition of $e=2.7182\ldots$

Euler's formula can be introduced in multiple and diverse math disciplines. This section would fit in well with series, or with a discussion of hyperbolic functions, or in calculus with a discussion of the natural logarithms or Taylor expansions. We are introducing Euler's formula here so that it might be easy to review a particular curve called the catenary. If these seem unrelated, just wait.

In this section, we are not going to derive the formula. What we have done thus far is just describe how $e$ is defined, but not actually found any value, and $e$ is not the Euler formula, although it really helps to have some idea of what $e$ is. The Euler Formula can be derived from Taylor series. I personally like a derivation that comes from solving the differential equation $$\frac{d}{dx}y=ky\qquad y(0)=1.$$

The formula is $e^{i\theta}=cos(\theta)+i\cdot sin(\theta)$. Some additional insight comes from looking at the series expansion of $e^{x}$ as well as the trig functions.

These are the series expansion written so that each term in $x^{n}$ is properly aligned. We can see that these functions all use the same terms but in all cases except $e^{x}$, some of the terms are omitted. For example, $\sin(x)$ uses only the odd powers of $x$, while $\cos(x)$ uses only the even powers. The hyperboic versions of these use exactly the same terms, but always use a positive sign.

$$\begin{array}{ccccccccccccccccc} e^{x} & = & {\displaystyle \sum_{n=0}^{\infty}\frac{x^{n}}{n!}} & = & 1 & + & x & + & \frac{x^{2}}{2!} & + & \frac{x^{3}}{3!} & + & \frac{x^{4}}{4!} & + & \frac{x^{5}}{5!} & + & \cdots\\ \sin(x) & = & {\displaystyle \sum_{n=0}^{\infty}}\frac{(-1)^{n}x^{2n+1}}{(2n+1)!} & = & & & x & & & - & \frac{x^{3}}{3!} & & & + & \frac{x^{5}}{5!} & - & \cdots\\ \cos(x) & = & {\displaystyle \sum_{n=0}^{\infty}}\frac{(-1)^{n}x^{2n}}{(2n)!} & = & 1 & & & - & \frac{x^{2}}{2!} & & & + & \frac{x^{4}}{4!} & & & - & \cdots\\ \sinh(x) & = & {\displaystyle \sum_{n=0}^{\infty}}\frac{x^{2n+1}}{(2n+1)!} & = & & & x & & & + & \frac{x^{3}}{3!} & & & + & \frac{x^{5}}{5!} & + & \cdots\\ \cosh(x) & = & {\displaystyle \sum_{n=0}^{\infty}}\frac{x^{2n}}{(2n)!} & = & 1 & & & + & \frac{x^{2}}{2!} & & & + & \frac{x^{4}}{4!} & & & + & \cdots \end{array}$$

Using the formula, all of the trig functions can be expressed as exponentials. $$\sin(x)=\frac{e^{ix}-e^{-ix}}{2i}\qquad\qquad\sinh(x)=\frac{e^{x}-e^{-x}}{2} \tag{1} \label{1}$$ $$\cos(x)=\frac{e^{ix}+e^{-ix}}{2}\qquad\qquad\cosh(x)=\frac{e^{x}+e^{-x}}{2} \tag{2} \label{2}$$

Example: Show that $$\sin(x)=\frac{e^{ix}-e^{-ix}}{2i}.$$
Proof: First, we will expand $e^{ix}$ using the series expansions. Start by writing $e^{x}$. $$e^{x}=1+x+\frac{x^{2}}{2!}+\frac{x^{3}}{3!}+\frac{x^{4}}{4!}+\frac{x^{5}}{5!}+\cdots \tag{3} \label{3}$$ Then substitute in $ix$ for $x$. $$e^{ix}=1+ix+\frac{(ix)^{2}}{2!}+\frac{(ix)^{3}}{3!}+\frac{(ix)^{4}}{4!}+\frac{(ix)^{5}}{5!}+\cdots$$ Next distribute the powers of $ix$. $$e^{ix}=1+ix+\frac{i^{2}x^{2}}{2!}+\frac{i^{3}x^{3}}{3!}+\frac{i^{4}x^{4}}{4!}+\frac{i^{5}x^{5}}{5!}+\cdots$$ Clean up the expression by replacing powers of $i$ with equivalent values. $$\begin{aligned}i^{1}= & \sqrt{-1}\\ i^{2}= & -1\\ i^{3}= & -i\\ i^{4}= & 1\quad\text{repeat all} \end{aligned} $$ $$e^{ix}=1+ix-\frac{x^{2}}{2!}-\frac{ix^{3}}{3!}+\frac{x^{4}}{4!}+\frac{ix^{5}}{5!}+\cdots \tag{4} \label{4}$$ Now we will write the second term that we are working to show. It is $e^{-ix}$. $$e^{-ix}=1-ix+\frac{(-ix)^{2}}{2!}+\frac{(-ix)^{3}}{3!}+\frac{(-ix)^{4}}{4!}+\frac{(-ix)^{5}}{5!}+\cdots$$ $$e^{-ix}=1-ix+\frac{(-i)^{2}x^{2}}{2!}+\frac{(-i)^{3}x^{3}}{3!}+\frac{(-i)^{4}x^{4}}{4!}+\frac{(-i)^{5}x^{5}}{5!}+\cdots$$ Just for reference, we will write the powers of $-i$. $$(-i)^{1}=-i\quad(-i)^{2}=-1\quad(-i)^{3}=i\quad(-i)^{4}=1\quad \text{repeat}$$ Now simplify. $$e^{-ix}=1-ix-\frac{x^{2}}{2!}+\frac{ix^{3}}{3!}+\frac{x^{4}}{4!}-\frac{ix^{5}}{5!}+\cdots \tag{5} \label{5}$$ Write the numerator of what we are trying to show. It will be $e^{ix}-e^{-ix}$ which is equation $\eqref{4}$ less equation $\eqref{5}$. $$1+ix-\frac{x^{2}}{2!}-\frac{ix^{3}}{3!}+\frac{x^{4}}{4!}+\frac{ix^{5}}{5!}+\cdots-\left(1-ix-\frac{x^{2}}{2!}+\frac{ix^{3}}{3!}+\frac{x^{4}}{4!}-\frac{ix^{5}}{5!}+\cdots\right)$$ and again simplify. $$\left(e^{ix}-e^{-ix}\right)=2ix-2\frac{ix^{3}}{3!}+2\frac{ix^{5}}{5!}+\cdots$$ Finally, we will divide through by $2i$ according to the problem expression. $$sin(x)=\frac{e^{ix}-e^{-ix}}{2i}=\frac{2ix-2\frac{ix^{3}}{3!}+2\frac{ix^{5}}{5!}+\cdots}{2i}=x-\frac{x^{3}}{3!}+\frac{x^{5}}{5!}+\cdots$$ Similarly, the other expressions of $\eqref{1}$ and $\eqref{2}$ can be shown.

Hyperbolic Functions

Hyperbola.png
Figure 1: Graph of the parametric equation, x=cosh(t),y=sinh(t). The 'hyperbolic angle', t, is not really an angle at all. In the graph, the green left portion is (-cosh(t),-sinh(t)) and the blue right portion is (+cosh(t),+sinh(t)).

In showing Euler's Formula, we threw in two functions, $\sinh(x)$ and $\cosh(x)$, which have not yet been introduced. Let's restate Euler's definition for these functions, $$\cosh(x)=\frac{e^{x}+e^{-x}}{2}$$ $$\sinh(x)=\frac{e^{x}-e^{-x}}{2}$$ and let's graph them parametrically as $x=cosh(t),\ y=sinh(t)$. As seen in figure 1, the graph makes a unit hyperbola. The asymptotes are $x=y$ and $x=-y$. It is analogous to the unit circle. $$\left(\begin{array}{c} x\\ y \end{array}\right)=\left(\begin{array}{c} \cos t\\ \sin t \end{array}\right)\equiv\text{Unit Circle } ,0 \le t \le2 \pi$$ $$\left(\begin{array}{c} x\\ y \end{array}\right)=\left(\begin{array}{c} \cosh t\\ \sinh t \end{array}\right)\equiv\text{Unit Hyperbola } ,-\infty \le t \le \infty$$ Like the circle, the hyperbola can be mis-shapen. When a circle is other than round, we rename it an ellipse, but when a hyperbola is other than 'round', we continue to just call it a hyperbola. However, the equations are totally analogous. The parametric hyperbola, written with basis vectors, $\mathbf{u}$ and $\mathbf{v}$ where we have semi-major axis, $a$, and semi-minor axis, $b$, is $$\left(\begin{array}{c} x\\ y \end{array}\right)=a\cdot\cosh(t)\cdot\mathbf{u}+b\cdot\sinh(t)\cdot\mathbf{v}.$$

Complex Numbers to Polar Form

We have not introduced complex numbers. We have instead relied on your having some understanding from elsewhere. However, the Euler formula uses complex numbers enough that we need to be able to easily convert from something like $1-i$ to $\sqrt{2}e^{i\pi/4}$. Complex numbers can be graphed on the Argand plane, which is just to say that they are graphed on the $xy$ plane with the real part as the $x$ value and the imaginary part as the $y$ value. Having graphed a complex number, we can draw a line from the origin to the number. The angle between that line and the positive side of the $x$ axis is called the argument of the complex number. It is the same as the polar angle $\theta$ that we previously encountered with polar coordinates. The length of the line from the origin to the complex number point is its modulus and exactly like we did with polar coordinates, we get its modulus as the magnitude of the line. If $z=a+bi$ is the number, then

UnitCircleAngles.png
Figure 1: Common angles of the Unit Circle. The angles are labeled as fractions of $\pi$.The values in parentheses are cosine and sine.

$$|z|=\text{modulus}=\sqrt{a^{2}+b^{2}}.$$ Thus the modulus of $(1-i)=\sqrt{1^{2}+(-1)^{2}}=\sqrt{2}$.

The argument of a complex number is an angle. I repeat this because it is easy to forget, but all angles in $\mathbb{R}^{2}$ can be expressed between $0$ and $2\pi$. If an angle is expressed as a negative, it just means that we have progressed from the positive $x$ axis in a clockwise direction. If the number is greater than $2\pi$ it can be adjusted without loss to be between $0$ and $2\pi$. When working with these angles, it is frequently helpful to refer to the common angles of the unit circle.

Example: Given the complex number, $\sqrt{2}e^{-55i\pi/2}$, convert it to the form $a+bi$.
Answer: Everything except the $i$ in the exponent of $e$ is the argument, i.e. the angle. Since it is already expressed as a fraction of $\pi$ we can easily increase or decrease it by as many complete circles as we want. So we might choose to increase it by $28$ complete circles, which means adding $56\pi/2$ to the exponent, getting $\sqrt{2}e^{i\pi/2}$. Next we could use the Euler formula to get $$\sqrt{2}e^{i\pi/2}=\sqrt{2}\cdot\left(\cos\left(\frac{\pi}{2}\right)+i\sin\left(\frac{\pi}{2}\right)\right)=i\sqrt{2}$$
Example: Given the complex number $2\sqrt{6}e^{17i\pi/12}$ convert it to the form $a+bi$.
Answer: Here an angle of $17\pi/12$ is already between $0$ and $2\pi$. So we would have $2\sqrt{6}\left(\cos\left(\frac{17}{12}\pi\right)+i\sin\left(\frac{17}{12}\pi\right)\right)$. We can go a bit further. $$\cos\left(\frac{17\pi}{12}\right)=\cos\left(\frac{5\pi}{4}+\frac{\pi}{6}\right)=\cos\frac{5\pi}{4}\cdot\cos\frac{\pi}{6}-\sin\frac{5\pi}{4}\sin\frac{\pi}{6}$$ $$\cos\frac{17\pi}{12}=\frac{-\sqrt{2}}{2}\cdot\frac{\sqrt{3}}{2}-\frac{\sqrt{2}}{2}\frac{1}{2}=\frac{-\sqrt{6}+\sqrt{2}}{4}$$ Similarly $$\sin\left(\frac{17\pi}{12}\right)=\frac{-\sqrt{6}-\sqrt{2}}{4}.$$

Sometimes, we want to go the other way.

Example: Express $1-i\sqrt{3}$ in polar form.
Answer: We need two pieces of information, the modulus and the argument. The modulus is $\sqrt{1^{2}+\left(-\sqrt{3}\right)^{2}}=2$ The argument is $\arctan\left(\frac{-\sqrt{3}}{1}\right)=-\frac{\pi}{3}$. Now we just write the polar form. $$(1-i\sqrt{3})=2e^{-i\pi/3}$$

Let's do one more example where we start with the answer from our first example and convert complex to polar.

Example: Convert the complex number $0+i\sqrt{2}$ to a polar form.
Answer: First get the modulus. $r=\sqrt{0^{2}+\sqrt{2}^{2}}=\sqrt{2}$   then get the angle, $\tan^{-1}(\sqrt{2}/0)$. So dividing by zero is not really a thing. However, from the unit circle we see that anytime the real component, $x$ is zero that the angle is either $\pi/2$ or $-\pi/2$. Since the $y$ value is positive, we have $+\pi/2$ for $\theta$. Thus the polar form is $\sqrt{2}e^{i\pi/2}$.

Trig Identities from Euler's Formula

Let's find a useful identity for $cos(3\theta)$. From Euler's formula we can write $$e^{i(3\theta)}=e^{(i\theta)^{3}}=(\cos\theta+i\sin\theta)^{3}$$ We can expand the right side to give: $$\cos^{3}\theta+3i\cos^{2}\theta\sin\theta-3\cos\theta\sin^{2}\theta-i\sin^{3}\theta$$ and collect real and imaginary terms. $$e^{i(3\theta)}=\left(\cos^{3}\theta-3\cos\theta\sin^{2}\theta\right)-i\left(\sin^{3}\theta-3\cos^{2}\theta\sin\theta\right)$$ To make this easier to view, let $C=\cos\theta$ and $S=\sin\theta$. Then $$e^{i(3\theta)}=(C+iS)^{3}=C^{3}-3CS^{2}-i(S^{3}-3C^{2}S)$$ Since $C^{2}+S^{2}=1$, we can replace $S^{2}=1-C^{2}$ and $C^{2}=1-S^{2}$ $$e^{i(3\theta)}=C^{3}-3C(1-C^{2})-i\left(S^{3}-3(1-S^{2})S\right),$$ which can be simplified to $$e^{i(3\theta)}=4C^{3}-3C+i\left(-4S^{3}+3S)\right)$$ Now equating the real and imaginary terms, $$cos(3\theta)=4C^{3}-3C\qquad sin(3\theta)=3S-4S^{3}$$ So we found an identity for $cos(3\theta)$ $$\cos(3\theta)=4\cos^{3}\theta-3\cos\theta$$ and in the process, we also found a trig identity for $\sin(3\theta)$. $$\sin(3\theta)=3\sin\theta-4\sin^{3}\theta.$$